home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 Applications 1996 May / SGI IRIX 6.2 Applications 1996 May.iso / dist / impr_dev.idb / usr / impressario / src / gui_models / laserjetPJL / Makefile.z / Makefile
Makefile  |  1996-05-06  |  8KB  |  190 lines

  1. #! smake
  2. #*************************************************************************
  3. # Copyright (c) 1993 Silicon Graphics, Inc.
  4. #
  5. # Permission to use, copy, modify, distribute, and sell this software and
  6. # its documentation for any purpose is hereby granted without fee, provided
  7. # that (i) the above copyright notices and this permission notice appear in
  8. # all copies of the software and related documentation, and (ii) the name of
  9. # Silicon Graphics may not be used in any advertising or publicity relating
  10. # to the software without the specific, prior written permission of Silicon
  11. # Graphics.
  12. # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
  13. # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  14. # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  15. #
  16. # IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
  17. # INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
  18. # RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF
  19. # THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT
  20. # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  21. #
  22. # SILICON GRAPHICS RESERVES THE RIGHT TO CHANGE FUTURE VERSIONS OF THIS
  23. # SOFTWARE IN ANY MANNER AND AT ANY TIME WITHOUT PRIOR NOTICE.
  24. #*************************************************************************
  25. #
  26. # Makefile - Graphical model file for HP LaserJet printers.
  27. #
  28. #    This file builds the sample gui_model program source into an
  29. #    executable gui_model. The model file follows SGI conventions for
  30. #    building programs. To successfully build a gui_model program
  31. #    the development workstation must have the X11 and Motif
  32. #    development environment installed.
  33. #
  34. #    If, as recommended, you develop your gui_model simply by modifying
  35. #    the example source code provided in this directory, you will only
  36. #    need to change the name of the executable gui_model program produced
  37. #    by this Makefile. This name is specified by the variable TARGETS
  38. #    and is described below.
  39. #
  40. #    Refer to the README file in this directory for information
  41. #    on the gui_model source code files. Refer to the gui_model
  42. #    specification in /usr/impressario/doc for background information
  43. #    on the gui_model program.
  44. #
  45. #    Note that this Makefile uses the parallel make program 'smake'.
  46. #    To use 'make' remove the "! smake" from the first line of this file
  47. #    leaving only the '#'.
  48. #
  49. #    If you wish to compile the example code with the EXAMPLE_ADD
  50. #    flag, uncomment the second LCDEFS line. Leave the first LCDEFS
  51. #    line uncommented at all times.
  52. #
  53. # $Revision: 1.2 $
  54. #
  55. #*************************************************************************
  56.  
  57. #
  58. # The commondefs file contains a number of useful macros and provides
  59. # a Makefile framework. The commondefs file along with the $(COMMONRULES)
  60. # file that it defines allow the developer to create simple, consistent and
  61. # extremely useful Makefiles without the need to write a complex Makefile
  62. # constructions. You are encouraged to read the /usr/include/make/commondefs
  63. # file to learn more about the services it provides.
  64. #
  65. include /usr/include/make/commondefs
  66.  
  67. #
  68. # NOTE TO DEVELOPER: IF YOU HAVE ONLY MADE MODIFICATIONS TO THE SOURCE
  69. #    FILES IN THIS DIRECTORY AND HAVE NOT ADDED OR REMOVED ANY SOURCE
  70. #    FILES ALL YOU NEED TO CHANGE IN THIS FILE IS THE VALUE OF THE
  71. #    TARGETS and APP_DEFS VARIABLE.
  72. #
  73. # TARGETS should be set to the name you wish to give your executable
  74. # gui_model file program. The base name of the target MUST be the same
  75. # as the name of the printer's model file located in /var/spool/lp/model.
  76. # The suffix MUST be '.gui' must be added to this base target name.
  77. #
  78. # APP_DEFS should be the name of the program app defaults file. Note
  79. # that the name of app defaults file must match the name assigned to
  80. # GUI_CLASS in the file gui_class.h (this value must also match the
  81. # string assigned to GUI_CLASS in the printer model file).
  82. #
  83. TARGETS = laserjet_model.gui
  84. APP_DEFS = LaserJet
  85.  
  86. #
  87. # These are the C language source files that comprise the gui_model
  88. # program. Refer to the commondefs/commonrules files for source
  89. # file variables names (e.g. AFILES, C++FILES, etc.). If you add
  90. # or remove source files from your gui_model program you must make
  91. # the corresponding changes to this list.
  92. #
  93. CFILES = main.c \
  94.      general_opts.c \
  95.      ps_opts.c \
  96.      image_opts.c \
  97.      text_opts.c \
  98.      util.c \
  99.      resource.c
  100.  
  101. #
  102. # These are commond-line flags to the C compiler and linker.
  103. # Refer to the cc man page for details on the meaning of the
  104. # switches. Refer to the commondefs file for information on
  105. # on the meaning and use of the variables.
  106. #
  107. LCDEFS = -DFUNCPROTO -DNARROWPROTO -DNeedFunctionPrototypes
  108. # Uncomment next line for example option.
  109. #LCDEFS += -DEXAMPLE_ADD
  110. LCOPTS = -fullwarn
  111. LLDLIBS = -lXm -lXt -lX11 -lpod -lspool -lgen 
  112.  
  113. #
  114. # This variable specifies the standards compliance level of
  115. # the compilation. Typical values for this variable are -xansi
  116. # for ANSI C compliant compiles and -cckr for K&R compilation.
  117. # Refer to the cc man page for information on compliance level
  118. # switches and commondefs for the use of this variable.
  119. #
  120. CVERSION = -xansi
  121.  
  122. #
  123. # This set the optimization level for the C compiler. Refer to
  124. # the cc man page for details. If you wish to build a debugable
  125. # version of your program you can either change this variable
  126. # to -g or invoke the make as:
  127. #
  128. #    make OPTIMIZER=-g
  129. #
  130. OPTIMIZER=-O2
  131.  
  132. #
  133. # This is the default build target. If you simply type 'make',
  134. # this target will be executed. First an incremental depend is
  135. # run. This simply parses the source code files for #include's
  136. # and makes note of the files dependency on a given header file.
  137. # Next make is invoked recursively to actually build the program
  138. # specified by TARGETS. We recursively invoke make because when
  139. # we do a parallel make (i.e. use smake) this recursive invocation
  140. # ensures that we perform the incdepend first and the building of
  141. # the program after that. If we did not use this construct, the
  142. # incdepend would happen in parallel with the building of the
  143. # program. This would lead to undersireable results. Note that we
  144. # pass the value of OPTIMIZER to the recursive invocation of make
  145. # so that this invocation remembers what OPTIMIZER has been set to.
  146. # This is needed if OPTIMIZER is specified on the make command-line
  147. #
  148. default all: $(TARGETS)
  149.  
  150. #
  151. # The commondefs file defines a variable COMMONRULES. This
  152. # variable is set to the pathname of the commonrules file.
  153. # The commonrules file should be included after the definition
  154. # of the default target. The commonrules file defines a number
  155. # standard targets (e.g. clobber, clean). Refer to the
  156. # /usr/include/make/commonrules file for details.
  157. #
  158. include $(COMMONRULES)
  159.  
  160. #
  161. # The OBJECTS variable is automatically set to be the .o's
  162. # corresponding to the CFILES specified above. These .o's will
  163. # be built using built-in compilation rules. The line below links
  164. # these OBJECTS into the executable specified by TARGETS.
  165. #
  166. $(TARGETS): $(OBJECTS)
  167.     $(CCF) $(OBJECTS) $(LDFLAGS) -o $@
  168.  
  169. #
  170. # Typically the install target builds the program and then installs
  171. # it in the directory where it will be distributed. For example,
  172. # you might be building your gui_model program in the directory
  173. # /usr/people/foo/myprog but the program will live in
  174. # /var/spool/lp/gui_model if built on a IRIX 4.X system or
  175. # /var/spool/lp/gui_model/ELF if built on an IRIX 5.X system.
  176. # The install(1) program can be invoked by this install rule to place
  177. # the program in the distribution directory.
  178. #
  179. install: all
  180. # Install the graphical option program (for IRIX 5.X build)
  181.     $(INSTALL) -m 755 -u lp -g lp \
  182.            -F /var/spool/lp/gui_model/ELF $(TARGETS)
  183. # Install the graphical option program (for IRIX 4.X build)
  184. #    $(INSTALL) -m 755 -u lp -g lp \
  185. #           -F /var/spool/lp/gui_model $(TARGETS)
  186. # Install the app-defaults file
  187.     $(INSTALL) -m 644 -F /usr/lib/X11/app-defaults \
  188.             $(APP_DEFS)
  189.